/**
 * Copyright (C) 2009+ Spark Zheng
 *
 * @file        src/dserver_errno.h 
 * @date        2010-04-05
 * @brief	server_framework
 * @see         dserver
 * @history
 */

#ifndef _DSERVER_ERRNO_H
#define _DSERVER_ERRNO_H

#ifdef __cplusplus
extern "C" {
#endif

#include <errno.h>

/** server error number */
typedef enum {
	RET_SUCCESS = 0,
	
	E_FILE_OPEN,	/* 1 */
	E_FILE_READ,
	E_FILE_WRITE,
	E_FILE_FCNTL,
	E_FILE_IOCTL,	/* 5 */

	E_MEM_POOL,
	E_MEM_LACK,

	E_UNEXPECTED,
	E_ARGS_ILLEGAL,
	E_INPUT_ILLEGAL,/* 10 */	
	E_RES_LIMITED,
	E_RES_BUSY,

	E_ITEM_EXIST,
	E_ITEM_NOTEXIST,
	
	E_PROC_FORK,	/* 15 */
	E_PROC_THREAD,
	E_MUTEX,
	
	E_NETDB,
	E_NET_CONN,
	E_SOCKET,	/* 20 */
	E_FCNTL,
	E_EVENT,
	E_EVENT_NODATA,

	E_NETWORK_READ,
	E_NETWORK_WRITE,/* 25 */
	E_NETWORK_RST,

	E_PROT_UNSUPPORT,

	E_DB_INIT,
	E_DB_OPENED,
	E_DB_CLOSED,	/* 30 */

	E_UTILS_PROTOCOL,
	E_UTILS_NETDB,
	E_UTILS_SOCKET,
	E_UTILS_SOCKOPT,
	E_UTILS_BIND,	/* 35 */
	E_UTILS_LISTEN,
	E_UTILS_CONNECT,
	E_UTILS_CLOSE,

	E_PIPELINE_SYNC,
	E_PIPELINE_ASYNC	/* 40 */

} dserver_return_t;

#ifdef __cplusplus
}
#endif
#endif
